package cn.micro.core.util;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * 跟踪类变动比较
 */
public class BeanDiff {
	/**
	 * 变更字段
 	 */
	@JsonIgnore
	private transient Set<String> fields = new HashSet<>();
	/**
	 * 旧值
	 */
	@JsonIgnore
	private transient Map<String, Object> oldValues = new HashMap<>();
	/**
	 * 新值
	 */
	@JsonIgnore
	private transient Map<String, Object> newValues = new HashMap<>();

	public Set<String> getFields() {
		return fields;
	}

	public void setFields(Set<String> fields) {
		this.fields = fields;
	}

	public Map<String, Object> getOldValues() {
		return oldValues;
	}

	public void setOldValues(Map<String, Object> oldValues) {
		this.oldValues = oldValues;
	}

	public Map<String, Object> getNewValues() {
		return newValues;
	}

	public void setNewValues(Map<String, Object> newValues) {
		this.newValues = newValues;
	}
}
